package com.jike.noobmoney.mvp.view.activity;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.duoyou.ad.openapi.DyAdApi;
import com.jike.noobmoney.R;
import com.jike.noobmoney.contants.ConstantValue;
import com.jike.noobmoney.pcegg.PcEggActivity;
import com.jike.noobmoney.util.AppInfoUtils;
import com.jike.noobmoney.util.SPUtils;
import com.jike.noobmoney.xq.XqActivity;
import com.lz.playmy.WowanIndex;
import com.toomee.mengplus.manager.TooMeeManager;

import butterknife.BindView;
import butterknife.OnClick;

public class GameCenterActivity extends BaseActivity {


    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    private String userid = "";

    @Override
    protected int layoutResID() {
        return R.layout.game_center_layout;
    }

    @Override
    protected void initData() {
        tvTitle.setText("游戏大厅");
        userid = SPUtils.getInstance().getString(ConstantValue.SpType.userid);
    }

    @OnClick({R.id.ll_b,R.id.ll_a,R.id.iv_back,R.id.ll_c,R.id.ll_d,R.id.ll_e,R.id.img_right})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_back:
                finish();
                break;
            case R.id.img_right:
                Intent intentgl=new Intent(context,WebActivity.class);
                intentgl.putExtra("url","http://api.ads66.com/faq.html");
                intentgl.putExtra("title","游戏攻略");
                startActivity(intentgl);
                break;
            case R.id.ll_b:
                //蛋蛋赚
                Intent intent = new Intent();
                intent.setClass(context.getApplicationContext(), WowanIndex.class);
                startActivity(intent);
                break;
            case R.id.ll_c:
                 //pc蛋蛋
                 PcEggActivity.startActivity(context, "", userid);
                 break;
            case R.id.ll_a:
                //聚享玩
                TooMeeManager.start(context);
                break;

//            case R.id.ll_c:
//                startActivity(new Intent(context, DianCaiActivity.class));
//                break;
            case R.id.ll_d:
                DyAdApi.getDyAdApi().jumpAdList(context, userid, 0);
                DyAdApi.getDyAdApi().setTitleBarColor(R.color.maincolor);
                DyAdApi.getDyAdApi().setTitle("小白游赚");
                break;
            case R.id.ll_e:
                //嘻趣
                XqActivity.startActivity(context, "3251", "wsfhnb1v8sxbzq71", userid);
                break;



        }
    }
}
